home *** CD-ROM | disk | FTP | other *** search
- property ancestor, pSlider, pIsIncreasing
-
- on new me, buttonName, castName, theChannel, theStageLoc, Slider, isIncreasing, descendant
- if objectp(descendant) then
- ancestor = new(script("generic button"), buttonName, castName, theChannel, theStageLoc, descendant)
- else
- ancestor = new(script("generic button"), buttonName, castName, theChannel, theStageLoc, me)
- end if
- pSlider = Slider
- pIsIncreasing = isIncreasing
- return me
- end
-
- on trackMouse me
- if not me.pIsDisabled then
- performFunction(me._me)
- repeat while the mouseDown
- State = the memberNum of sprite me.pChannel
- if rollOver(me.pChannel) then
- set the member of sprite the pChannel of me to me.pDownState
- performFunction(me._me)
- else
- set the member of sprite the pChannel of me to me.pUpState
- end if
- if not (State = the memberNum of sprite me.pChannel) then
- updateStage()
- end if
- end repeat
- set the member of sprite the pChannel of me to me.pUpState
- updateStage()
- end if
- return me
- end
-
- on performFunction me
- setting = getSetting(pSlider)
- if pIsIncreasing then
- setThumb(pSlider, setting + 1)
- else
- setThumb(pSlider, setting - 1)
- end if
- return me
- end
-
- on buttonLoc me
- return me
- end
-